{# my paginator template --wangxi#}
<div class="row">
    <div class="col-md-8 col-sm-8 col-md-offset-4">
        <ul class="pagination">
            {#首页#}
            <li class="paginate_button">
                {% if count_all > 0 %}
                <a href="?page=1">首页</a>
                {% else %}
                <a href="javascript:void(0);" class="disabled">首页</a>
                {% endif %}
            </li>

            {% if last_page > 1 %}
            {% for p in 1..last_page %}
                {% if current_page == p %}
                    <li class="paginate_button active">
                {% else %}
                    <li class="paginate_button">
                {% endif %}
                <a href="?page={{ p }}">{{ p }}</a>
                </li>
            {% endfor %}
            {% endif %}

            {#末页#}
            <li class="paginate_button">
                {% if last_page > 1 %}
                <a href="?page={{ last_page }}">末页</a>
                {% else %}
                <a href="?page=1">末页</a>
                {% endif %}
            </li>

        </ul>
        <span class="paginate_desc pull-right">共{{ last_page }}页, {{ count_all }}条记录</span>
    </div>

</div>